package com.teach.flavour.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import com.teach.flavour.service.impl.FlavourTagServiceImpl;
import com.teach.flavour.model.po.FlavourTag;
import org.springframework.web.bind.annotation.RequestParam;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 口味标签表 前端控制器
 * </p>
 * @version 1.0
 * @author hzz
 * @since 2020-03-04
 */
@RestController
@RequestMapping("/flavourTag")
public class FlavourTagController {
    @Autowired
    private FlavourTagServiceImpl serviceFlavourTag;

    @RequestMapping("/index")
    public String fun(HttpServletRequest request,HttpServletResponse response){
        return "ok";
    }
    @RequestMapping("/list")
    public List<FlavourTag> getList(){
        Map<String,Object> param=null;
        return serviceFlavourTag.getList(param);
    }
    @RequestMapping("/save")
    public boolean save(@RequestParam("entity") FlavourTag entity){
        return serviceFlavourTag.saveOrUpdate(entity);
    }

}

